Skip to content

fix(ingo): register Ingo\ PSR-4 autoload for V3 form types#33

Merged
TDannhauer merged 1 commit into
FRAMEWORK_6_0from
fix/ingo-form-v3-autoload
Jun 20, 2026
Merged

fix(ingo): register Ingo\ PSR-4 autoload for V3 form types#33
TDannhauer merged 1 commit into
FRAMEWORK_6_0from
fix/ingo-form-v3-autoload

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Register Ingo\src/ PSR-4 autoload in composer.json and .horde.yml
  • Fixes fatal error on Forward, Vacation, and Spam filter pages

Motivation

After the V3 form migration (91cbbb2), custom field types live in
Ingo\Form\V3\LongemailVariable and Ingo\Form\V3\FoldersVariable.
Horde_Form::createVariable() looks up {App}\Form\V3\{Type}Variable,
but only Horde\Ingo\ was autoloaded from src/, so pages using
ingo:Longemail or ingo:folders crashed with "Nonexistent class
Ingo_Form_Type_Longemail".

Changes

  • Add "Ingo\\": "src/" to autoload.psr-4 in composer.json
  • Mirror the mapping in .horde.yml

Test plan

  • Open Ingo → Forward — form loads without fatal error
  • Open Ingo → Vacation — form loads without fatal error
  • Open Ingo → Spam — folder selector loads without fatal error
  • Enter invalid email in Longemail field — validation message shown

Made with Cursor

Horde_Form resolves ingo:Longemail and ingo:folders to Ingo\Form\V3\*
classes. The V3 migration removed legacy lib/Form/Type/Longemail.php but
autoload was switched to Horde\Ingo\ only, leaving those classes unloadable.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Registers the Ingo\ PSR-4 namespace to src/ (in both Composer and Horde build metadata) so Horde’s V3 form variable lookup can autoload Ingo\Form\V3\*Variable classes and avoid fatals on affected filter pages.

Changes:

  • Add Ingo\\ => src/ to composer.json autoload.psr-4.
  • Mirror the same Ingo\ => src/ mapping in .horde.yml to keep Horde packaging/build autoload metadata consistent.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
composer.json Adds PSR-4 autoload entry for Ingo\ so V3 form variable classes under src/Form/V3 can be found.
.horde.yml Mirrors the Ingo\ PSR-4 mapping for Horde’s build/packaging metadata consistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TDannhauer TDannhauer merged commit 01c1bb3 into FRAMEWORK_6_0 Jun 20, 2026
1 of 7 checks passed
@amulet1

amulet1 commented Jun 20, 2026

Copy link
Copy Markdown
Member

I do not think this is the right fix.

All classes in src/ use the correct namespaces. E.g. V3 classes have namespace Ingo\Form\V3;.

Based on error message I think the reporter just has an outdated horde/form.

TDannhauer added a commit that referenced this pull request Jun 21, 2026
@TDannhauer

Copy link
Copy Markdown
Contributor Author

changes reverted, thanks for the hint @amulet1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants